<% var item, key %>
<% htmlWebpackPlugin.options.appMountIds = htmlWebpackPlugin.options.appMountIds || [] %>
<% htmlWebpackPlugin.options.lang = htmlWebpackPlugin.options.lang || "en" %>
<% htmlWebpackPlugin.options.links = htmlWebpackPlugin.options.links || [] %>
<% htmlWebpackPlugin.options.meta = htmlWebpackPlugin.options.meta || [] %>
<% htmlWebpackPlugin.options.scripts = htmlWebpackPlugin.options.scripts || [] %>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <!-- https://div.io/topic/1409 -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, shrink-to-fit=no">
    <meta name="browsermode" content="application"/>
    <meta name="x5-page-mode" content="app" />
    <meta name="wap-font-scale" content="no" />
    <title>凯普奇网络资源管理系统</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.css" rel="stylesheet">
    <% for (item of htmlWebpackPlugin.options.links) { %>
    <% if (typeof item === 'string' || item instanceof String) { item = { href: item, rel: 'stylesheet' } } %>
  	<link<% for (key in item) { %> <%= key %>="<%= item[key] %>"<% } %>>
    <% } %>

    <% for (key in htmlWebpackPlugin.files.css) { %>
    <% if (htmlWebpackPlugin.files.cssIntegrity) { %>
    <link
      href="<%= htmlWebpackPlugin.files.css[key] %>"
      rel="stylesheet"
      integrity="<%= htmlWebpackPlugin.files.cssIntegrity[key] %>"
      crossorigin="<%= webpackConfig.output.crossOriginLoading %>">
    <% } else { %>
    <link href="<%= htmlWebpackPlugin.files.css[key] %>" rel="stylesheet">
    <% } %>
    <% } %>
    <% if (htmlWebpackPlugin.options.headHtmlSnippet) { %>
      <%= htmlWebpackPlugin.options.headHtmlSnippet %>
    <% } %>

    <% if (htmlWebpackPlugin.options.window) { %>
    <script>
      <% for (key in htmlWebpackPlugin.options.window) { %>
      window['<%= key %>'] = <%= JSON.stringify(htmlWebpackPlugin.options.window[key]) %>;
      <% } %>
    </script>
    <% } %>
  </head>
  <body>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <% if (htmlWebpackPlugin.options.inlineManifestWebpackName) { %>
        <%= htmlWebpackPlugin.files[htmlWebpackPlugin.options.inlineManifestWebpackName] %>
    <% } %>
    <% for (item of htmlWebpackPlugin.options.scripts) { %>
    <% if (typeof item === 'string' || item instanceof String) { item = { src: item, type: 'text/javascript' } } %>
  	<script<% for (key in item) { %> <%= key %>="<%= item[key] %>"<% } %>></script>
    <% } %>
    <% for (key in htmlWebpackPlugin.files.chunks) { %>
    <% if (htmlWebpackPlugin.files.jsIntegrity) { %>
    <script
      src="<%= htmlWebpackPlugin.files.chunks[key].entry %>"
      type="text/javascript"
      integrity="<%= htmlWebpackPlugin.files.jsIntegrity[htmlWebpackPlugin.files.js.indexOf(htmlWebpackPlugin.files.chunks[key].entry)] %>"
      crossorigin="<%= webpackConfig.output.crossOriginLoading %>"></script>
    <% } else { %>
    <script src="<%= htmlWebpackPlugin.files.chunks[key].entry %>" type="text/javascript"></script>
    <% } %>
    <% } %>
  </body>
</html>
